/*
 * ExceptionExists.h
 *
 *  Created on: 11/10/2011
 *      Author: gisedaye
 */

#ifndef CUSTOMEXCEPTION_H_
#define CUSTOMEXCEPTION_H_
#include <exception>
#include <string>
using namespace std;

class CustomException : public exception {

protected:

	char* message;
	int type;


public:

	static const int WARNING = 0;
	static const int ERROR	 = 1;

	CustomException() {
	}

	CustomException(int type, char* message) {
		this->message = message;
		this->type = type;
	}

	virtual const char * what() const throw() {
		return message;
	}

	/*
	* Devuelve el tipo de excepcion de parseo.
	*/
	int getType() {
		return this->type;
	}


};

#endif /* EXCEPTIONEXISTS_H_ */




